home *** CD-ROM | disk | FTP | other *** search
/ HAKERIS 11 / HAKERIS 11.ISO / linux / system / LinuxConsole 0.4 / linuxconsole0.4install-en.iso / opt0.4.lcm / share / penggy / chat / aolnet.scm next >
Encoding:
Text File  |  2004-02-26  |  3.5 KB  |  113 lines

  1. ;;
  2. ;; Copyright (C) 2002-2003  Jean-Charles Salzeber <jc@varspool.net>
  3. ;;
  4. ;; This file is part of penggy.
  5. ;;
  6. ;; This program is free software; you can redistribute it and/or
  7. ;; modify it under the terms of the GNU General Public License
  8. ;; as published by the Free Software Foundation; either version 2
  9. ;; of the License, or (at your option) any later version.
  10. ;; 
  11. ;; This program is distributed in the hope that it will be useful,
  12. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. ;; GNU General Public License for more details.
  15. ;; 
  16. ;; You should have received a copy of the GNU General Public License
  17. ;; along with this program; if not, write to the Free Software
  18. ;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  19. ;; 02111-1307, USA.
  20. ;;                
  21. ;; $Id: aolnet.scm,v 1.7 2003/02/01 13:45:28 chupa Exp $
  22. ;;
  23.  
  24.  
  25. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  26. ;;                                                                  ;;
  27. ;; Scheme script for logon into AOLnet servers                      ;;
  28. ;;                                                                  ;;
  29. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  30.  
  31. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  32. ;; general end function
  33. (define (aol-connect) 
  34.   (chat-try 120
  35.       '("Connected"      (chat-success))
  36.       '("Open"           (chat-success))
  37.       '("Unavailable"    (chat-failure))
  38.       '("Connect Failed" (chat-failure))
  39.       '("Not Available"  (chat-failure))
  40.       '("Unreachable"    (chat-failure))
  41.       '("No Connection"  (chat-failure))
  42.       '("Bad Password"   (chat-failure))
  43.       '("Login Invalid"  (chat-failure))
  44.       '("NO CARRIER"     (chat-failure))
  45.       '(else             (chat-failure))))
  46.  
  47.  
  48.  
  49. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  50. ;; Login into an ANS server type
  51. (define (ans-login)
  52.   (chat-try 20
  53.       '("login"      (begin
  54.                  (chat-send "aol\r") 
  55.                  (aol-connect)))
  56.       '("NO CARRIER" (chat-failure))
  57.       '(else         (chat-failure))))
  58.  
  59.  
  60.  
  61. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  62. ;; Login into a BBN server type
  63. (define (bbn-login2)
  64.   (chat-send "aolnet\r")
  65.   (chat-try 20
  66.       '("Password"   (begin
  67.                  (chat-send "A0L2aNet\r") 
  68.                  (aol-connect)))
  69.       '("NO CARRIER" (chat-failure))
  70.       '(else         (chat-failure))))
  71.  
  72. (define (bbn-login)
  73.   (chat-try 20
  74.       '("login"      (bbn-login2))
  75.       '("NO CARRIER" (chat-failure))
  76.       '(else         (chat-failure))))
  77.  
  78.  
  79.  
  80. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  81. ;; Login into a Sprint server type
  82. (define (sprint-login2)
  83.   (chat-send "aol\r")
  84.   (chat-try 20
  85.       '("Password"   (begin
  86.                  (chat-send "aol\r") 
  87.                  (aol-connect)))
  88.       '("NO CARRIER" (chat-failure))
  89.       '(else         (chat-failure))))
  90.  
  91. (define (sprint-login)
  92.   (chat-try 20
  93.       '("Username"   (sprint-login2))
  94.       '("login"      (sprint-login2))
  95.       '("NO CARRIER" (chat-failure))
  96.       '(else         (chat-failure))))
  97.  
  98.  
  99.  
  100. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  101. ;; Main entry point, it try to determine server type
  102. (define (chat-connect) 
  103.   (chat-try 20 
  104.       '("ANSNet"     (ans-login))
  105.       '("UU.Net"     (ans-login))
  106.       '("Saturn.BBN" (bbn-login))
  107.       '("Sprint-IP"  (sprint-login))
  108.       '("UQKT1"      (ans-login))
  109.       '("UQKT2"      (sprint-login))
  110.       '("Connected"  (chat-success))
  111.       '("NO CARRIER" (chat-failure))
  112.       '(else         (chat-failure))))
  113.